<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div>aaa {{  hello  }} aaa</div>
        <div>bbb {{  about  }} bbb</div>
        <div>            
            <div v-text="hello">v-if</div>
        </div>
        <div>
            <input type="text" v-model="hello">
        </div>
        <div v-html="html"></div>
        <div v-on:click="parentClick">
            <h1>v-on:click 父节点</h1>
            <div v-on:click="clickHandler">
                <h1>v-on:click 子节点</h1>
            </div>
            <div v-on:click.stop="clickHandler">
                <h1>v-on:click.stop 子节点</h1>
            </div>
        </div>
    </div>    
    <script type="module">
        import Vue from './vue/index.js'
        window.vm = new Vue({
            el: '#app',
            data: {
                msg: '111',
                count: 123,
                person: {
                    hello: 123
                },
                hello: 'hello',
                about: 'about',
                html: '<h1>v-html指令演示内容</h1>'
            },
            methods: {
                clickHandler(e) {
                    alert('v-on点击事件触发')
                    console.log(this)
                },
                parentClick(e) {
                    alert('v-on父节点点击事件触发')
                }
            }
        })
    </script>
</body>
</html>